<?
class Page extends Common{
    var $table = 'page_static';
    var $id_field = 'pag_id';
    var $name_field = 'pag_title';
    var $picture_field = 'pag_picture';
    var $page_type;
    var $result = array();
    public function __construct($type = 'introduction'){
        parent::__construct();
        $this->page_type = $type;
        $this->result = db_first('SELECT pag_id,pag_title,pag_picture,pag_summary,pag_detail,pag_type,pag_active 
                                  FROM page_static
                                  WHERE pag_active = 1 AND pag_type = "'.$this->page_type.'"
                                  LIMIT 1');
        $this->id = $this->result['pag_id'];
        $this->name = $this->result['pag_title'];
        $this->description = $this->result['pag_summary'];
        $this->url = DOMAIN.'/gioi-thieu.html';
        $this->picture = DOMAIN.page_img.$this->result['pag_picture'];
    }
}
?>